package org.example.risk.controller;

import org.example.product.api.model.ProductModel;
import org.example.product.client.service.ProductClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RiskController {

    @Autowired
    private ProductClient productClient;

    @RequestMapping(value = "/risk/list", method = RequestMethod.GET)
    ResponseEntity<List<ProductModel>> list(){
        return productClient.list();
    }

}
